<%@ page import="cn.gudian.cms.Admin.AdminRole" %>
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
  <meta name="layout" content="main"/>
  <title><g:message code="adminRole.show" default="Show AdminRole"/></title>
</head>
<body>
<div class="nav">
  <span class="menuButton"><a class="home" href="${createLinkTo(dir: '')}"><g:message code="home" default="Home"/></a></span>
  <span class="menuButton"><g:link class="list" action="list"><g:message code="adminRole.list" default="AdminRole List"/></g:link></span>
  <c:isPermit roles="SYSTEM_ADMIN"><span class="menuButton"><g:link class="create" action="create"><g:message code="adminRole.new" default="New AdminRole"/></g:link></span></c:isPermit>
</div>
<div class="body">
  <h1><g:message code="adminRole.show" default="Show AdminRole"/></h1>
  <g:if test="${flash.message}">
    <div class="message"><g:message code="${flash.message}" args="${flash.args}" default="${flash.defaultMessage}"/></div>
  </g:if>
  <g:form>
    <g:hiddenField name="id" value="${adminRoleInstance?.id}"/>
    <div class="dialog">
      <table>
        <tbody>

        <tr class="prop">
          <td valign="top" class="name"><g:message code="adminRole.id" default="Id"/>:</td>

          <td valign="top" class="value">${fieldValue(bean: adminRoleInstance, field: "id")}</td>

        </tr>

        <tr class="prop">
          <td valign="top" class="name"><g:message code="adminRole.name" default="Name"/>:</td>

          <td valign="top" class="value">${fieldValue(bean: adminRoleInstance, field: "name")}</td>

        </tr>

        <tr class="prop">
          <td valign="top" class="name"><g:message code="adminRole.roles" default="Roles"/>:</td>

          <td valign="top" class="value">${fieldValue(bean: adminRoleInstance, field: "roles")}</td>

        </tr>

        <tr class="prop">
          <td valign="top" class="name"><g:message code="adminRole.adminUser" default="Admin User"/>:</td>

          <td valign="top" style="text-align: left;" class="value">
            <ul>
              <g:each in="${adminRoleInstance?.adminUser}" var="adminUserInstance">
                <li><g:link controller="adminUser" action="show" id="${adminUserInstance.id}">${adminUserInstance.encodeAsHTML()}</g:link></li>
              </g:each>
            </ul>
          </td>

        </tr>

        </tbody>
      </table>
    </div>
    <c:isPermit roles="SYSTEM_ADMIN">
      <div class="buttons">
        <span class="button"><g:actionSubmit class="edit" action="edit" value="${message(code: 'edit', 'default': 'Edit')}"/></span>
        <span class="button"><g:actionSubmit class="delete" action="delete" value="${message(code: 'delete', 'default': 'Delete')}" onclick="return confirm('${message(code: 'delete.confirm', 'default': 'Are you sure?')}');"/></span>
      </div>
    </c:isPermit>
  </g:form>
</div>
</body>
</html>
